//
//  CPRightview.m
//  CPApp
//
//  Created by yobet on 2018/3/22.
//  Copyright © 2018年 Class. All rights reserved.
//

#import "CPRightview.h"

@implementation CPRightview
-(instancetype)init {
    if (self = [super init]) {
        self = [[NSBundle mainBundle] loadNibNamed:@"CPRightview" owner:nil options:nil].firstObject;
    }
    return self;
}
-(void)setNavTitle:(NSString *)navTitle {
    _navTitle = navTitle;
}
- (IBAction)categaryBtnClicked:(UIButton *)sender {
    if ([_navTitle isEqualToString:@"彩讯"]) {
        [mNotificationCenter postNotificationName:@"colorMsgNotification" object:nil userInfo:@{@"tag":@(sender.tag),@"title":sender.titleLabel.text}];
        return;
    }
    if ([_navTitle isEqualToString:@"本期预测"]) {
        [mNotificationCenter postNotificationName:@"predictNotification" object:nil userInfo:@{@"tag":@(sender.tag),@"title":sender.titleLabel.text}];
        return;
    }
    [mNotificationCenter postNotificationName:@"categaryBtnNotification" object:nil userInfo:@{@"sender":@(sender.tag)}];
}

@end
